package com.scsj.supermarket.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.scsj.supermarket.R;
import com.scsj.supermarket.bean.SixRecommendBean;

import java.util.List;

/**
 * 首页功能键新开页面中六种推荐
 */

public class SixRecommendAdapter extends BaseQuickAdapter<SixRecommendBean, BaseViewHolder> {

    public SixRecommendAdapter(List data) {
        super(R.layout.item_six_recommend_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SixRecommendBean item) {

        helper.setText(R.id.func_name_tv, item.getFunc_name_tv());
        helper.setText(R.id.func_price_tv, item.getFunc_price_tv());
        Glide.with(mContext).load(item.getFunc_img_iv()).into((ImageView) helper.getView(R.id.func_img_iv));
    }
}
